<script setup lang="ts">
import { DesignerRuntime } from './DesignerRuntime'
import DesignerTest from './DesignerTest.vue'

// 初始化设计器环境
const engine = new DesignerRuntime()
</script>

<template>
  <div class="test-app">
    <header class="test-header">
      <h1>表单设计器测试页面</h1>
      <div class="nav-links">
        <a href="/">返回主应用</a>
      </div>
    </header>
    
    <main>
      <DesignerTest />
    </main>
    
    <footer class="test-footer">
      <p>访问此测试页面：<code>/?test=designer</code></p>
    </footer>
  </div>
</template>

<style scoped>
.test-app {
  font-family: Arial, sans-serif;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.test-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

h1 {
  margin: 0;
  font-size: 24px;
  color: #333;
}

.nav-links a {
  color: #409EFF;
  text-decoration: none;
}

.nav-links a:hover {
  text-decoration: underline;
}

.test-footer {
  margin-top: 30px;
  padding-top: 10px;
  border-top: 1px solid #eee;
  font-size: 14px;
  color: #666;
}

code {
  background-color: #f5f5f5;
  padding: 2px 5px;
  border-radius: 3px;
  font-family: monospace;
}
</style>